package com.itheima.string;

import com.itheima.string.domain.Student;

import java.util.Scanner;

public class Demo8 {
    public static void main(String[] args) {
        //1.键盘录入,并接收数据
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生信息");
        String stuInfo= sc.nextLine();
        //2.根据","分割字符串得到有效数据并组成数组
        String[] sArr=stuInfo.split(",");
        //3.从得到的字符串数组中
        Student stu = new Student(sArr[0],sArr[1]);

        System.out.println(stu.getName()+"..."+stu.getAge());
    }
}
